#include "algebra.h"
#include "constants.h"
#include <cmath>

using namespace krryn;

float math::sin(float a_Angle){
    return ::sinf(a_Angle);
}

float math::acos(float a_Angle){
    return ::acos(a_Angle);
}

float math::sqrt(float a_Number){
    return ::sqrtf(a_Number);
}

float math::abs(float a_Arg){
    return ::fabsf(a_Arg);
}

float math::floor(float a_Arg){
    return ::floorf(a_Arg);
}

float math::pow(float a_Arg, float a_Pow){
    return ::powf(a_Arg, a_Pow);
}

float math::log(float a_Num, float a_Base){
	return ::logf(a_Num) / ::logf(a_Base);
}

float math::cos(float a_Angle){
    return ::cos(a_Angle);
}

float math::degree_to_radian(float a_Degree){
    return a_Degree / 180.f * PI;
}

int math::round(float a_Number){
	float l_Sign = a_Number / ::fabsf(a_Number);
	return static_cast<int>(l_Sign * (::fabsf(a_Number) + .5f));
}